package cn.com.cjwsjy.monitor.platform.earlywarn.service;

import cn.com.cjwsjy.monitor.platform.earlywarn.requestVO.EarlyWarningPlanQuery;
import cn.com.cjwsjy.monitor.platform.earlywarn.utils.R;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * 应急预案
 *
 * @author
 */
public interface EarlyWarningPlanService {
    /**
     * 获取所有工程部位
     * @return
     */
    R getAllPositions();

    /**
     * 获取所有预警等级
     * @return
     */
    R getAllLevels();

    /**
     * 添加应急预案
     *
     * @return
     */
    R addPlan(String docName, String warningLevel, String applicablePeriod, String positionName, MultipartFile file, String uploadPerson) throws Exception;

    /**
     * 获取所有已添加过的适用时期
     *
     * @return
     */
    R  getAllPeriods();
    /**
     * 修改应急预案
     *
     * @return
     */
    R updatePlan(Long id,String docName, String warningLevel, String applicablePeriod, String positionName, MultipartFile file, String uploadPerson) throws Exception;
    /**
     * 删除应急预案
     *
     * @return
     */
    R deletePlan(Long id);
    
    /**
     * 条件查询应急预案
     * @param earlyWarningPlanQuery 查询条件
     * @return
     */
    R queryPlan(EarlyWarningPlanQuery earlyWarningPlanQuery);

    /**
     * 通过预警消息设置表id查询应急预案信息
     * @param id 预警消息设置表id
     * @return
     */
    R getPlanInfoByWarningMessageId(int id);

    /**
     * 下载应急预案
     * @param id 应急预案对应的id
     * @param response 响应体
     * @return
     */
    R downloadPlan(Long id, HttpServletResponse response);
}
